
main(){
  var throwStudy = ThrowStudy();
  try{
    throwStudy.exceptionTest(0);
  }on StateError catch (e){
    print("Could not describe object: $e");
  }finally{
    print("执行结束");
  }
}
class ThrowStudy{
  void exceptionTest(int astronauts){
    if(astronauts == 0){
      throw StateError("No astronauts");
    }
  }
}